function frenacalc(unitchoice,pna,una,pcr,ucr){

var frena=0;
var rfi=0;
var creatinine=pcr;

//convert SI to US
if (unitchoice){
pcr=pcr/88.4;
ucr=ucr/88.4
}

//Fractional Excretion of Sodium (FENa) = (UNa x PCr) / (PNa x UCr) x 100

frena= ((una*pcr)/(pna*ucr))*100;


frena=Math.round(frena*100)/100;
	
//Renal Failure Index (RFI) = (UNa x PCr) / UCr

rfi=(una*pcr)/ucr;
rfi=Math.round(rfi*100)/100;
sodium=pna;
return {
			frena:frena,
			rfi:rfi,
			sodium:sodium,
			creatinine:creatinine
		};		 
}



function ref(){
// display reference
 return "Fractional Excretion of Sodium (FENa) = (UNa x PCr) / (PNa x UCr) x 100" + "<br/>" + "Renal Failure Index (RFI) = (UNa x PCr) / UCr";

}